package com.xyy.scaffoldweb;

import com.xyy.scaffoldcommon.util.JsonData;
import com.xyy.scaffoldservice.BannerService;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class BannerController {
    @Resource
    BannerService bannerService;

    @GetMapping("/select_banner_list")
    public JsonData selectBannerList() {
        return JsonData.buildSuccess(bannerService.selectBannerList());
    }

    @GetMapping("/insert_banner")
    public void insertBanner(@Param("bannerId") String bannerId, @Param("bannerImg") String bannerImg) {
        bannerService.insertBanner(bannerId, bannerImg);
    }




}
